<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body>
<div>
 <table>
    <form id="form-orderItem-add" >
        <div class="row">
            <div class="col-sm-8 col-sm-offset-2">
                <h4 class="form-header h4 ">快递信息</h4>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-4 col-sm-offset-2">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>快递公司：</label>
                    <div class="col-sm-8">

                        <select name="expressCompanyId" class="form-control"
                                th:with="type=${@expressC.listExpressCompanys()}">
                            <option th:each="ec : ${type}" th:text="${ec.expressCompanyName}" th:value="${ec.expressCompanyId}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>快递单号：</label>
                    <div class="col-sm-8">
                        <input name="expressNo" autocomplete="off" placeholder="请输入快递单号" class="form-control" type="text" maxlength="20" required>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-8 col-sm-offset-2">
                <h4 class="form-header h4">包裹信息</h4>
            </div>
        </div>
            <div class="row" style="margin-bottom: 10px;">
                <div class="col-sm-4 col-sm-offset-2">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>物品名称：</label>
                    <div class="col-sm-8">
                        <input name="goodsName" autocomplete="off" placeholder="请输入物品名称" class="form-control" type="text" maxlength="80" required>
                    </div>
                </div>
                <div class="col-sm-4">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>物品数量：</label>
                    <div class="col-sm-8">
                        <input name="qty" autocomplete="off"  class="form-control" type="text"  required>
                    </div>
                </div>
            </div>

            <div class="row" style="margin-bottom: 10px;">
                <div class="col-sm-4 col-sm-offset-2">
                    <label class="col-sm-4 control-label"><span style="color: red; ">*</span>申报价值：</label>
                    <div class="col-sm-8">
                        <input name="declaredValue" autocomplete="off"  class="form-control" type="text" maxlength="80" required>
                    </div>
                </div>
            </div>
            <div class="row " style="margin-bottom: 10px;">
                <div class="col-sm-4 col-sm-offset-2">
                    <label class="col-sm-4 control-label"></span>备注：</label>
                    <div class="col-sm-8">
                        <textarea name="remark" id="remark" cols="100" rows="5"></textarea>
                    </div>
                </div>
            </div>
<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
    </div>
</div>
    </form>
 </table>
    <div th:include="include::footer"></div>
<script>
    var prefix = ctx + "transaction/order";

    $("#form-orderItem-add").validate({

        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-orderItem-add").serializeArray();
            $.operate.saveTab(prefix + "/addOrderItemTmp", data);

        }
    }
</script>

</div>

</body>
</html>
